{% extends "base.html" %}

{% block title %}首页 - 英语词汇量估算工具{% endblock %}

{% block content %}
<div class="row">
    <div class="col-lg-8 mx-auto">
        <div class="text-center mb-5">
            <h1 class="display-4 mb-3">英语词汇量估算工具</h1>
            <p class="lead text-muted">基于机器学习的智能词汇量评估系统，帮助您准确了解自己的英语词汇水平</p>
        </div>
    </div>
</div>

<div class="row mb-5">
    <div class="col-md-4 mb-4">
        <div class="card h-100 text-center">
            <div class="card-body">
                <i class="fas fa-chart-line fa-3x text-primary mb-3"></i>
                <h5 class="card-title">智能估算</h5>
                <p class="card-text">采用先进的机器学习算法，基于词汇难度和词频分析，准确估算您的词汇量水平。</p>
            </div>
        </div>
    </div>
    <div class="col-md-4 mb-4">
        <div class="card h-100 text-center">
            <div class="card-body">
                <i class="fas fa-tasks fa-3x text-success mb-3"></i>
                <h5 class="card-title">多种测试</h5>
                <p class="card-text">支持交互式测试、批量处理和语料分析等多种测试方式，满足不同需求。</p>
            </div>
        </div>
    </div>
    <div class="col-md-4 mb-4">
        <div class="card h-100 text-center">
            <div class="card-body">
                <i class="fas fa-shield-alt fa-3x text-warning mb-3"></i>
                <h5 class="card-title">安全可靠</h5>
                <p class="card-text">采用密码加密和Token认证机制，保护您的个人信息和测试数据安全。</p>
            </div>
        </div>
    </div>
</div>

<div class="row">
    <div class="col-lg-6">
        <div class="card">
            <div class="card-header">
                <h5 class="mb-0"><i class="fas fa-info-circle me-2"></i>系统特色</h5>
            </div>
            <div class="card-body">
                <ul class="list-unstyled">
                    <li class="mb-2"><i class="fas fa-check text-success me-2"></i>基于COCA词频数据库的准确分析</li>
                    <li class="mb-2"><i class="fas fa-check text-success me-2"></i>多级别词汇难度评估（小学到专业八级）</li>
                    <li class="mb-2"><i class="fas fa-check text-success me-2"></i>置信度评估，提供可靠性指标</li>
                    <li class="mb-2"><i class="fas fa-check text-success me-2"></i>算法验证和稳定性测试</li>
                    <li class="mb-2"><i class="fas fa-check text-success me-2"></i>个性化学习建议和进度跟踪</li>
                    <li class="mb-2"><i class="fas fa-check text-success me-2"></i>支持批量测试和语料分析</li>
                </ul>
            </div>
        </div>
    </div>
    
    <div class="col-lg-6">
        <div class="card">
            <div class="card-header">
                <h5 class="mb-0"><i class="fas fa-chart-bar me-2"></i>词汇量水平参考</h5>
            </div>
            <div class="card-body">
                <div class="row">
                    <div class="col-6">
                        <div class="text-center mb-3">
                            <h6 class="text-primary">基础水平</h6>
                            <p class="mb-1">小学: 1,000词</p>
                            <p class="mb-1">初中: 3,000词</p>
                            <p class="mb-1">高中: 6,000词</p>
                        </div>
                    </div>
                    <div class="col-6">
                        <div class="text-center mb-3">
                            <h6 class="text-success">高级水平</h6>
                            <p class="mb-1">四级: 12,000词</p>
                            <p class="mb-1">六级: 18,000词</p>
                            <p class="mb-1">专业: 25,000+词</p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

{% if not current_user.is_authenticated %}
<div class="row mt-5">
    <div class="col-lg-8 mx-auto text-center">
        <div class="card">
            <div class="card-body">
                <h5 class="card-title">开始您的词汇量测试之旅</h5>
                <p class="card-text">注册账号，开始使用我们的智能词汇量估算工具</p>
                <a href="{{ url_for('register') }}" class="btn btn-primary me-3">
                    <i class="fas fa-user-plus me-2"></i>立即注册
                </a>
                <a href="{{ url_for('login') }}" class="btn btn-outline-primary">
                    <i class="fas fa-sign-in-alt me-2"></i>已有账号登录
                </a>
            </div>
        </div>
    </div>
</div>
{% else %}
<div class="row mt-5">
    <div class="col-lg-8 mx-auto text-center">
        <div class="card">
            <div class="card-body">
                <h5 class="card-title">欢迎回来，{{ current_user.username }}！</h5>
                <p class="card-text">继续您的词汇量测试，查看历史记录</p>
                <a href="{{ url_for('test') }}" class="btn btn-primary me-3">
                    <i class="fas fa-play me-2"></i>开始测试
                </a>
                <a href="{{ url_for('dashboard') }}" class="btn btn-outline-primary">
                    <i class="fas fa-tachometer-alt me-2"></i>查看记录
                </a>
            </div>
        </div>
    </div>
</div>
{% endif %}
{% endblock %} 